package com.tuanzi.loan.business.service.common;

import com.tuanzi.loan.business.entity.common.CommProductId;
import com.tuanzi.loan.core.service.CommonService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.channel.CommProductIdRequest;
import com.tuanzi.loan.vo.response.channel.CommProductIdResponse;
import org.primefaces.model.TreeNode;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author Ray 2017/10/31
 */
public interface CommProductIdService extends CommonService<CommProductId,Long> {

	List<CommProductId> findAll();

	List<CommProductId> findAllAppProducts();

	List<CommProductId> findAllByParentId(String parentId);

	Page<CommProductIdResponse> list(PageSearcher<CommProductIdRequest> pageSearcher);

	CommProductId findByProductId(Integer productId);

	/**
	 * 按照大产品生成树状信息
	 * @param selectNode 选择的组内容， 可为null
	 * @return TreeNode
	 */
	TreeNode createProductTreeNode(String selectNode);

}
